#ifndef HUNLIST_H
#define HUNLIST_H

#include "hunBase.h"

typedef struct hunList
{
    void *data;
    struct hunList *next, *prev;
} hunList;
// Get Item
hunList*    hunList_Front(hunList *list);
hunList*    hunList_Back(hunList *list);
hunList*    hunList_At(hunList *list, int num);
hunList*    hunList_PopFront(hunList *list);
hunList*    hunList_PopBack(hunList *list);
// Inset Item
hunList*    hunList_PushFront(hunList *list, void *data);
hunList*    hunList_PushBack(hunList *list, void *data);
hunList*    hunList_Append(hunList *list, hunList *item);
hunList*    hunList_InsertData(hunList *list, int idx, void *data);
// Find Item Index
int         hunList_Find(hunList *list, void *data);
hunList*    hunList_FindAll(hunList *list, void *data);

hunBool hunList_RemoveByIdx(hunList *list, int idx);
hunBool hunList_InsertByItem(hunList *list, hunList *item, void *data);
hunBool hunList_RemoveByItem(hunList *list, int idx);

int     hunList_Size(hunList *list);
void    hunList_Reset(hunList *list);
#endif
